package com.dnjn.happiness.biz.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dnjn.happiness.biz.domain.Training;
import com.dnjn.happiness.biz.domain.TrainingRecordVO;
import com.dnjn.happiness.biz.domain.TrainingVO;
import com.dnjn.happiness.biz.domain.vo.StatisticalAnalysisAppriseVO;
import com.dnjn.happiness.biz.domain.vo.StatisticalAnalysisVO;

import java.util.List;
import java.util.Map;

/**
 * 发起培训Service接口
 *
 * @author amber
 * @date 2023-10-11
 */
public interface ITrainingService extends IService<Training> {
    /**
     * 查询发起培训
     *
     * @param trainingId 发起培训主键
     * @return 发起培训
     */
    public Training selectTrainingByTrainingId(String trainingId);

    /**
     * 查询发起培训列表
     *
     * @param training 发起培训
     * @return 发起培训集合
     */
//    public List<Training> selectTrainingList(Training training);

    /**
     * 新增发起培训
     *
     * @param training 发起培训
     * @return 结果
     */
    public int insertTraining(TrainingVO training);

    /**
     * 修改发起培训
     *
     * @param training 发起培训
     * @return 结果
     */
    public int updateTraining(TrainingVO training);

    /**
     * 批量删除发起培训
     *
     * @param trainingIds 需要删除的发起培训主键集合
     * @return 结果
     */
//    public int deleteTrainingByTrainingIds(String[] trainingIds);

    /**
     * 删除发起培训信息
     *
     * @param trainingId 发起培训主键
     * @return 结果
     */
//    public int deleteTrainingByTrainingId(String trainingId);

    /**
     * 分页条件查询
     *
     * @param current
     * @param size
     * @param example
     * @return
     */
    Page<Training> pageCommentVo(Integer current, Integer size, Map<String, Object> example);


    Page<Training> listQueryByMy1(Long initiator, Page<Object> training_id);

    Page<Training> listQueryByMyInTo(Long userid, String trainingRecordStatus, Page<Object> training_id);

    Page<Training> listQueryByMy(TrainingRecordVO domain, Page<Object> training_id);


    void startTraingTime(Training one) throws Exception;

    void endTraingTime(Training one) throws Exception;

    Page<StatisticalAnalysisVO> selectStatisticalAnalysisTraining(String label, String symbol, Page<Object> happiness_score);


    Page<StatisticalAnalysisVO> selectStatisticalAnalysisTrainingMap(Map<String, String> map, Page<Object> happiness_score);

    Page<StatisticalAnalysisVO> selectStatisticalAnalysisTrainingList(StatisticalAnalysisAppriseVO voList, Page<Object> happiness_score);

    List<StatisticalAnalysisVO> selectStatisticalAnalysisTrainingList1(StatisticalAnalysisAppriseVO vo);

    int getTraingRecordNotJoin(Long userId,String time);


    int getTraingRecordYesJoin(Long userId,String time);
}
